The present invention relates to a cylindrical container's inner surface tester as an image processing device for testing inner surfaces of cylindrical containers such as beer cans while being carried by a conveyer to detect foreign substances, dust, scratches, etc.
FIG. 12 is a view for explaining a highlighted portion of a sample aluminum beer can when observed from above. FIG. 12A is a top view (image) of the container (can); and FIG. 12B is its sectional view. 102 is a container; 101 is a ring-shaped illuminator for illuminating the container 102 from above; 103 is a highlighted portion at the opening of the container; and 104 is a highlighted portion of its bottom. Thus, the portions 103 and 104 are highlighted at the opening and the bottom of the container. They are specifically highlighted if the container has metallic luster inside.
FIG. 13B shows intensity variations represented by the scanning line Q-Q1 on the top view of the container 102 (FIG. 13A). The intensity variations can be classified into 5 level area from W1 to W5. First area W1 refers to the highlighted opening portion 103; second area W2 refers to the internal upper middle part of the container indicating comparatively high intensity; third area W3 refers to the internal lower middle part of the container subject to less amount of light of the illuminator 101 shown in FIG. 12 indicating intensity lower than other portion of the container; fourth area W4 refers to the highlighted portion of the bottom; and fifth area W5 refers to the inner bottom of the container.
Conventionally, these areas W1-W5 are provided with a window individually and assigned thresholds used for detecting defects such as blacks spots (black points) and white spots (white points) according to the optical characteristics of each area. One method of detecting a defect is, for example, to convert by a predetermined threshold a multi-value continuous tone image signal of 8 bits, etc. to a binary value. The signal is obtained by A/D-converting an analog video signal (analog continuous tone image signal) obtained by scanning a target image. Another method is a differentiation method in which the above described video signal is differentiated through a differentiation circuit as shown in FIG. 29 to extract a defect signal. In the differentiation method, a differentiation signal can be obtained for the contour of a test object. While either of a positive pulse or a negative pulse is generated by the differentiation along the contour of a test object, these pulses are generated simultaneously at a fine defective point, thereby extracting a defect.
That is, if the following expressions exist between the a value P(i,j) and values P(i-.beta.,j) and P(i+.beta.,j), where P(i,j) indicates a target point (coordinates x=i and y=j) referred to by a signal P(x,y) obtained by differentiating an analog continuous tone image signal generated by a luster scanning operation, and P(i-C.alpha.,j) and P(i+.beta.,j) indicate the points .alpha. picture elements forward and .beta. picture elements backward of the above described point P(i,j) in the x direction of the scanning line. EQU P(i,j)-P(i-.alpha.,j)&gt;TH1 and EQU P(i+.beta.,j)-P(i,j)&gt;TH1
where TH1 indicates a predetermined threshold (positive value).
A binary function values PD(i,j)=1 and PD(i,j)=0 are defined for detecting a defect on a target point and respectively indicate an abnormal black point and a normal point.
However, in the above described defect detecting method, an optimum value of a threshold TH1 to be determined by optical characteristics of a container's inner surface is subject to change. Accordingly, in the conventional method, a number of concentric circle windows are necessary as shown by windows W1-W5 in FIG. 13 (five windows in this case). Simultaneously, these windows must be assigned different thresholds TH1 (and coordinates .alpha., .beta.,). Thus, much time is wasted during the luster scanning operation, thereby offering a bottleneck to a high speed defect detection.